package com.botarena.shared;

import java.io.Serializable;

public class UserInfo implements Serializable {

	private static final long serialVersionUID = 5140416114255626911L;
	
	private String key;
	private boolean loggedIn = false;
	private boolean hasAccount = false;
	private boolean isAdmin = false;
	private String loginUrl;
	private String logoutUrl;
	private String avatarUrl;
	private String emailAddress;
	private String nickname;
	private String name;

	
	public String getKey() {
		return key;
	}

	public void setKey(String key) {
		this.key = key;
	}
	
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public boolean isLoggedIn() {
		return loggedIn;
	}

	public void setLoggedIn(boolean loggedIn) {
		this.loggedIn = loggedIn;
	}
	
	public boolean hasAccount() {
		return hasAccount;
	}

	public void setHasAccount(boolean hasAccount) {
		this.hasAccount = hasAccount;
	}
	
	public String getAvatarUrl() {
		return avatarUrl;
	}

	public void setAvatarUrl(String avatarUrl) {
		this.avatarUrl = avatarUrl;
	}
	
	public boolean hasAvatar() {
		return avatarUrl != null;
	}

	public String getLoginUrl() {
		return loginUrl;
	}

	public void setLoginUrl(String loginUrl) {
		this.loginUrl = loginUrl;
	}

	public String getLogoutUrl() {
		return logoutUrl;
	}

	public void setLogoutUrl(String logoutUrl) {
		this.logoutUrl = logoutUrl;
	}

	public String getEmailAddress() {
		return emailAddress;
	}

	public void setEmailAddress(String emailAddress) {
		this.emailAddress = emailAddress;
	}

	public String getNickname() {
		return nickname;
	}

	public void setNickname(String nickname) {
		this.nickname = nickname;
	}
	
	public void setAdmin(boolean isAdmin) {
		this.isAdmin = isAdmin;
	}

	public boolean isAdmin() {
		return isAdmin;
	}
	
	@Override
	public String toString() {
		return "UserInfo [avatarUrl=" + avatarUrl + ", emailAddress="
				+ emailAddress + ", hasAccount=" + hasAccount + ", key=" + key
				+ ", loggedIn=" + loggedIn + ", loginUrl=" + loginUrl
				+ ", logoutUrl=" + logoutUrl + ", name=" + name + ", nickname="
				+ nickname + "]";
	}

	
}